﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace RTS
{
	public class RTSBuildingTextures : RTSTextures
	{
		private string idle = "BarracksSpriteSheetIDLE";
		private string death = "BarracksSpriteSheetDEATH";
		private string constructing = "BarracksSpriteSheetCONSTRUCTING";
		private string graphicInterface = "background for interface";
		private string graphicInterfaceExtended = "extended background for interface";
		private string graphicInterfaceOption = "button for interface";

		private Texture2D graphicInterfaceTexture;
		private Texture2D graphicInterfaceExtendedTexture;
		private Texture2D graphicInterfaceOptionTexture;

		public string Idle
		{
			set { idle = value; }
		}

		public string Death
		{
			set { death = value; }
		}

		public string Constructing
		{
			set { constructing = value; }
		}

		public string GraphicInterface
		{
			set { graphicInterface = value; }
		}

		public string GraphicInterfaceExtended
		{
			set { graphicInterfaceExtended = value; }
		}

		public string GraphicInterfaceOption
		{
			set { graphicInterfaceOption = value; }
		}

		public RTSBuildingTextures(TextureSize textureSize)
			: base(textureSize)
        {
			selectionArea = "building selection area";
			lifeBar = "Barracks_health bar life";
			lifeBarBackground = "Barracks_health bar empty";
			selected = "Barracks_selection circle";
        }

		public override void LoadContent(ContentManager Content)
		{
			LoadTexture(Building.Idle, idle, Content);
			LoadTexture(Building.Death, death, Content);
			LoadTexture(Building.Constructing, constructing, Content);

			graphicInterfaceTexture = Content.Load<Texture2D>(graphicInterface);
			graphicInterfaceExtendedTexture = Content.Load<Texture2D>(graphicInterfaceExtended);
			graphicInterfaceOptionTexture = Content.Load<Texture2D>(graphicInterfaceOption);

			base.LoadContent(Content);
		}

		public Texture2D GetGraphicInterfaceTexture()
		{
			if (texturesLoaded == false) Trace.WriteLine("Error GetGraphicInterfaceTexture RTSBuildingsTextures");

			return graphicInterfaceTexture;
		}

		public Texture2D GetGraphicInterfaceExtendedTexture()
		{
			if (texturesLoaded == false) Trace.WriteLine("Error GetGraphicInterfaceExtendedTexture RTSBuildingsTextures");

			return graphicInterfaceExtendedTexture;
		}

		public Texture2D GetgraphicInterfaceOptionTexture()
		{
			if (texturesLoaded == false) Trace.WriteLine("Error GetgraphicInterfaceOptionTexture RTSBuildingsTextures");

			return graphicInterfaceOptionTexture;
		}

	}
}
